﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class P4Type
    {
        /*
  ** Allowed values of VdbeOp.p4type
  */
        public const int P4_NOTUSED = 0; /* The P4 parameter is not used */
        public const int P4_DYNAMIC = (-1); /* Pointer to a string obtained from sqliteMalloc=(); */
        public const int P4_STATIC = (-2); /* Pointer to a static string */
        public const int P4_COLLSEQ = (-4); /* P4 is a pointer to a CollSeq structure */
        public const int P4_FUNCDEF = (-5); /* P4 is a pointer to a FuncDef structure */
        public const int P4_KEYINFO = (-6); /* P4 is a pointer to a KeyInfo structure */
        public const int P4_VDBEFUNC = (-7); /* P4 is a pointer to a VdbeFunc structure */
        public const int P4_MEM = (-8); /* P4 is a pointer to a Mem*    structure */
        public const int P4_TRANSIENT = (-9); /* P4 is a pointer to a transient string */
        public const int P4_VTAB = (-10); /* P4 is a pointer to an sqlite3_vtab structure */
        public const int P4_MPRINTF = (-11); /* P4 is a string obtained from Print.Sqlite3_mprintf=(); */
        public const int P4_REAL = (-12); /* P4 is a 64-bit floating point value */
        public const int P4_INT64 = (-13); /* P4 is a 64-bit signed integer */
        public const int P4_INT32 = (-14); /* P4 is a 32-bit signed integer */
        public const int P4_INTARRAY = (-15); /* #define P4Type.P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */

        public const int P4_SUBPROGRAM = (-18);
        /* #define P4Type.P4_SUBPROGRAM  (-18) /* P4 is a pointer to a SubProgram structure */

        /* When adding a P4 argument using P4Type.P4_KEYINFO, a copy of the KeyInfo structure
    ** is made.  That copy is freed when the Vdbe is finalized.  But if the
    ** argument is P4Type.P4_KEYINFO_HANDOFF, the passed in pointer is used.  It still
    ** gets freed when the Vdbe is finalized so it still should be obtained
    ** from a single sqliteMalloc().  But no copy is made and the calling
    ** function should *not* try to free the KeyInfo.
    */
        public const int P4_KEYINFO_HANDOFF = (-16); // #define P4Type.P4_KEYINFO_HANDOFF (-16)
        public const int P4_KEYINFO_STATIC = (-17); // #define P4Type.P4_KEYINFO_STATIC  (-17)

    }
}
